<script type="text/javascript"
     src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<head>
    <link rel="stylesheet" href="stylesheet_TMATS.css">
</head>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<title>
    T-MATS: Cantera Gas Table Builder
</title>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<body>
    <h1>
      T-MATS: Cantera Gas Table Builder
    </h1>
<hr>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<p> &nbsp&nbsp The Cantera Table Builder (CTB) works with the Cantera software package to create thermodynamic parameter lookup tables.
	These tables define the relationships between pressure, temperature, enthalpy, entropy, and FAR. Replacing the default T-MATS tables
	allows for the modeling of off-nominal thermodynamic parameters. It should be noted that, in T-MATS, the fuel energy is defined with
	LHV or enthalpy and that the default thermodynamic parameter tables represent two components, air and exhaust fumes (or fuel after combustion).
</p>
<p> &nbsp&nbsp The CTB GUI may be started by running the script "RunCTB.m". New gas property tables may then be created
    by filling out the tool GUI.
    Once the tables have been generated, the new files (pt2sc_TMATS.c, sp2tc_TMATS.c, h2tc_TMATS.c,
    and t2hc_TMATS.c) will be created in the AlternateTables folder. These
    files can be copied into \TMATS_Library\MEX replacing the
    current files of the same names. Once copied T-MATS should be re-compiled to complete
    the installation. It is a good idea to save the current (default) table files
    before they are overwritten. A folder (DefaultTables) has been created
    to accommodate such a procedure. It should be noted that the default tables assume a
    mass flow composition of Air and jet fuel.
</p>
<p>
    &nbsp&nbsp Additionally, in any model that uses generated tables the burner modules must
    be set to use enthalpy. It should be noted that Cantera makes use of enthlapy values
    that include the heat of formation (the default tables do not) and the enthalpy value
    chosen for the burner must reflect this. Example values for jet fuel include LHV
    equal to 18400 BTU/lbm (used with the default gas tables and does not include heat of formation) and
    enthlapy (used with Cantera generated gas tables and including heat of formation) equal to -1200 BTU/lbm. Note, negative numbers are okay,
    since the enthalpy is based on a reference zero value.
</p>
<p>
    <b>Steps:</b><br>
    <ol>
        <li>Run \TMATS\TMATS_Tools\GasTableBuilder\Run_CTB_GUI.m.<br>
        <li>Input desired criteria in the GUI.<br>
        <ul>
            <li> Names are symbols of the reactants. These must be consistant with Cantera nomneclature and appear in the .cti file.<br>
            <li>Species are the amount of each reactant in the stream by proporitional weight.<br>
            <li>Temperature and Pressure are the points at which the table would be generated.<br>
            <li>Stream fraction range is the range of Stream2 to Stream1 to be generated. T-MATS currently accounts for two stream types.<br>
        </ul>
        <li>Copy pt2sc_TMATS.c, sp2tc_TMATS.c, h2tc_TMATS.c, and t2hc_TMATS.c from
        the MEX folder to the the Default Tables folder.<br>
        <li>Copy the new .c files with the same names from the AlternateTables folder
        to the MEX folder.<br>
        <li>Re-compile T-MATS, note this may take much longer to compile as the new tables are complete lookups and the default tables use curve fits.<br>
        <li>Set T-MATS burner module within the Simulink model to use fuel enthlapy (hFuel) for fuel energy calculation.<br>
</ol>
</p>

<br><br>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
</body>